package com.hd.crdao.activity;

import android.widget.TextView;

import com.hd.crdao.R;
import com.hd.crdao.base.BaseSecondActivity;
import com.hd.crdao.bean.MessageBean;
import com.hd.crdao.view.ExpandHeadView;

import butterknife.BindView;

/**
 *
 *@author Programming
 *@date 2017/6/5 0005
 */
public class MessageDetailActivity extends BaseSecondActivity {
    @BindView(R.id.messagedetail)
    ExpandHeadView mMessagedetail;
    @BindView(R.id.title)
    TextView mTitle;
    @BindView(R.id.time)
    TextView mTime;
    @BindView(R.id.content)
    TextView mContent;

    @Override
    protected void initView() {
        // EventBus.getDefault().register(this);
        MessageBean.RowsBean messagedetail = (MessageBean.RowsBean) getIntent().getSerializableExtra("messagedetail");
        mTitle.setText(messagedetail.getSmTitle());
        mTime.setText(messagedetail.getCreateDate());
        mContent.setText(messagedetail.getSmContent());
    }

    @Override
    protected int setContentView() {
        return R.layout.activity_messagedetail;
    }

    @Override
    protected ExpandHeadView setExpandHeadView() {
        return mMessagedetail;
    }

 /*   @Override
    protected void onDestroy() {
        super.onDestroy();
        EventBus.getDefault().unregister(this);
    }*/

    /*@Subscribe(threadMode = ThreadMode.MAIN)
    public void UpdateUI(MessageEvent messageEvent) {
        ALog.d(messageEvent.getRowsBean().toString());

     *//*   mTitle.setText(rowsBean.getSmTitle());
        mTime.setText(rowsBean.getCreateDate());
        mContent.setText(rowsBean.getSmContent());*//*
    }*/
}
